<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require_once 'connect.php';
session_start();
if(isset ($_SESSION['permission'])&& $_SESSION['permission'] == 1) {
    //something code here
} else {
    //header('Location: login.php');
}
?>

<html>
    <head>
        <title>Administrator</title>
        <style type="text/css">
            body{
                margin: 0px auto;
                width: 960px;
                height: 100%;
                border: 2px solid #cccccc;
                -moz-boder-radius: 15px;
                overflow: hidden;
                line-height: 1.6;
            }
           
            
        </style>
        
        <link rel="stylesheet" href="css/adminStyle.css"/>
    </head>
    
    <body>
        <div id="header">
            <div class="logo"></div>
            <div id="logout">
                <ul>
                    <li><a href="../index.php">Home</a></li>
                    <li><a href="#">Logout</a></li>
                </ul>               
            </div>
        </div>

            <br></br>
            <fieldset align="center">
                <legend><b><i>Article Manager</i></b></legend>
                <table align="center" width=850 cellspacing="0" cellpadding="1" border="1">
                    <h3 align="center">Article Manager</h3>
                    <tr>
                        <th scope="col">uNews</th>
                        <th scope="col">Title</th>
                        <th scope="col">Statement</th>
                        <th scope="col">Edit</th>
                        <th scope="col">Delete</th>
                    </tr>
                    <tr>
                        <?php
                        require_once 'get_data.php';
                        $data = new PushData();
                        $data->getData();
                        ?>
                    </tr>

                   <tr>
                        <td align="right"><a href="publish_article.php">
                            <input align="center" type="submit" value="Add Article" width="200"/>
                        </a></td>    
                    </tr>
                    </fieldset>            
                </table>
            <div id="footer-admin">
                <h3 align="center"><a href="index.php">Contact us</a<></h3>
                <p align="center"> Author: Nam & Thien</p>
        </div>
        </body>
</html>
